package com.yoomiito.app.ui.goods

import android.widget.ImageView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.yoomiito.app.R
import com.yoomiito.app.utils.ImageLoader

class NewGoodsInfoPicAdapter(urls:List<String>?) :BaseQuickAdapter<String,BaseViewHolder>(R.layout.item_iv_1,urls){

    override fun convert(helper: BaseViewHolder?, item: String?) {
        val url = if (!item?.contains("http")!! && !item?.contains("https")) "http:$item" else item
        val iv = helper?.getView<ImageView>(R.id.item_iv)
        ImageLoader.getInstance().intoAllSize(mContext, url, iv, R.drawable.goods_default)
    }

}